]> permondes.de Git - Analog_Engine.git/blobdiff - scripts/EP1 04.02 Starting a Rocket_a.LACE
Throwing a stone on earth, starting a rocket from earth
[Analog_Engine.git] / scripts / EP1 04.02 Starting a Rocket_a.LACE
diff --git a/scripts/EP1 04.02 Starting a Rocket_a.LACE b/scripts/EP1 04.02 Starting a Rocket_a.LACE
new file mode 100644 (file)
index 0000000..25b0546
--- /dev/null
@@ -0,0 +1,33 @@
+# A rocket is started from the surface of the earth. Calculating the height as function of its mass and fuel consumption. 
+# Approximation of gravity of earth by g
+# Equation of motion
+# r'' = alpha / (m0 - alpha*t) * v0 - g
+#   alpha: fuel consumption, e.g. 2000t in 2,5 min = 13,333*10^3 kg/s
+#   m0: initial mass of rocket, e.g. Saturn V: 2900 t = 2,9*10^6 kg
+#   v0: the velocity of the exhaust of the rocket: 3,180*10^3 m/s
+#   g: acceleration of earth = 9,81 m/s^2
+
+include CompoundFunctions.LACE # include idivide
+
+coefficient.1     -> alpha1
+coefficient.2(+1) -> alpha2 # == alpha1
+coefficient.3(-1) -> -m0
+coefficient.4     -> v0
+coefficient.5(+1) -> g
+
+# generate t-ramp
+iintegrate (-1) -> t
+
+cmultiply (alpha1, t) -> alpha*t
+isum (-m0, alpha*t) -> m0-alpha*t
+idivide (alpha2, m0-alpha*t) -> -alpha/(m0-alpha*t)
+cmultiply (-alpha/(m0-alpha*t), v0) -> -alpha/(m0-alpha*t)*v0
+isum(-alpha/(m0-alpha*t)*v0, g) -> alpha/(m0-alpha*t)*v0-g
+
+iintegrate (alpha/(m0-alpha*t)*v0-g) -> -v
+invert (-v) -> v
+iintegrate (-v) -> z
+
+output (t) -> out.x
+output (v) -> out.y
+output (z) -> out.z